<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="/misc/css/base.css"  />
<link rel="stylesheet" type="text/css" href="/misc/css/btnicon.css"  />
<link rel="stylesheet" type="text/css" href="/misc/css/reset_admin.css"  />
<link rel="stylesheet" type="text/css" href="/misc/css/adminmenu.css"  />
<link rel="stylesheet" type="text/css" href="/misc/css/newadmin.css"  />
<script type="text/javascript" src="/misc/vendors/jquery/jquery_1.2.6.js"></script>
<script type="text/javascript" src="/misc/vendors/o2js/o2js.js"></script>
<script type="text/javascript" src="/misc/vendors/o2js/o2js_build.js"></script>
<script type="text/javascript" >
var baseUrl = "<?=$themeUrl?>";
$().ready(function(){

});
var grids;
</script>
</head>
<body   style="background-color:#fcfcfc"> 
<script type="text/javascript">
var url_save = '/admin_order/recdate_modify'; 

$().ready(function(){  
	showLoading();   
	$('#code').focus();
	o2js.build('dates'); 
	o2js.build('jscalendar');
	Calendar.setup({
		inputField:'rec_date',
		button:'slt_rec_date',
		ifFormat:"%Y-%m-%d", 
		singleClick:true
	}); 
});
/* 保存 */
function fnSave(){
	var form = {
		id:$('#id').val(),
		rec_date:$('#rec_date').val(),
		sendtime:$('#sendtime').val()
	};
	 
  $('button').attr('disabled','disabled');
	$.ajax({
		async:true,
		type:'post',
		url:url_save,
		data:{
			id:$('#id').val(),
			rec_date:$('#rec_date').val(),
			sendtime:$('#sendtime').val()
		},
		success:function(e){
  		$('button').attr('disabled','');
			var ok = errorHandler(e);
			if(ok){　 
				<?PHP
				if(isset($_GET['endfunc'])){
					echo 'parent.'.$_GET['endfunc'].'(ok);';
				}
				?>
				fnReturn();
			}
		}
	});
}
/* 返回 */
function fnReturn(){
	if(defined(parent) && defined(parent.ymPrompt)){
		parent.ymPrompt.close();
	}else{
		window.close();
	}
}
</script>
 
 
<div style="margin:10px;">
	<div class="blockdiv">
		<div class="titlediv">基本信息</div>
		<table class="mytable" > 
			<tr>
				<td class="mylabel">订单编号：</td>
				<td class="myinfo" >
					<input type="hidden" id="id" name="id" value="{$rs.id}"  />
					{$rs.code}
				</td>  
			</tr> 
		
			<tr>
				<td class="mylabel">配送日期：</td>
				<td class="myinfo" >
					<input type="text" class="textBoxDate" id="rec_date" value="{$rs.rec_date}"   maxlength="10" />
					<input id="slt_rec_date" class="btnicon_calendar" type="button">
				</td>
			</tr>  
			<tr>
				<td class="mylabel">配送时间段：</td>
				<td class="myinfo" >
					<select id="sendtime" class="textBox" name="sendtime">
						<?PHP
						foreach($sendtime as $v){
							if($v['id'] == $rs['sendtime']){
								echo '<option value="'.$v['id'].'" selected="selected">'.$v['val'].'</option>';
							}else{
								echo '<option value="'.$v['id'].'">'.$v['val'].'</option>';
							}	
						}
						?>
					</select>
				</td>
			</tr>  
		</table> 
	</div>
</div>
<div  class="button_div">
		<button class=" " onclick="fnSave()">保 存</button>
		<span class="gray">或</span> 
		<a href="#" onclick="fnReturn()">取 消</a>
</div> 
</body>
</html>